package edu.washington.cs.workflow.analysis.guistructure;

import edu.washington.cs.workflow.util.Utils;

public class UIMenuPos extends UIPos {

	private final String[] paths;
	
	public static UIMenuPos make(String[] paths) {
		return new UIMenuPos(paths);
	}
	
	protected UIMenuPos(String[] paths) {
		super(Integer.MAX_VALUE);
		Utils.checkNotNull(paths);
		Utils.checkTrue(paths.length > 0);
		this.paths = paths;
	}
	
	@Override
	public String[] getPaths() {
		return this.paths;
	}
	
	@Override
	public int getIndex() {
		throw new Error("Cannot call this on menu.");
	}
	
	@Override
	public String toString() {
		return "MenuUI Pos: " + Utils.dumpArray(paths);
	}
}
